Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migrate asset id on the frontend in the query editor #350

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

kevinwcyu
Copy link
Contributor

What this PR does / why we need it:

Fixes an issue where dashboards saved with versions before 1.6.0 do not show the selected asset in the query editor after updating to versions 1.6.0+.

The change in 1.6.0 migrated the asset id to asset ids only when the query ran, but the query editor still received the old query with only the assetId field populated so it couldn't fetch the asset info correctly.

This PR adds a very basic migration function that is called from the query editor. The only migration it implements now is to migrate assetId to assetIds.

Which issue(s) this PR fixes:

Fixes #238

Special notes for your reviewer:

I downgraded the SiteWise data source to v1.5.1 on my cloud instance and created a dashboard with a query type that includes the Asset selector. Then I exported the dashboard and imported it locally to test the migration.

@kevinwcyu kevinwcyu requested a review from a team as a code owner August 26, 2024 21:02
@kevinwcyu kevinwcyu requested review from idastambuk and njvrzm and removed request for a team August 26, 2024 21:02
@kevinwcyu kevinwcyu merged commit 9d7aa13 into main Sep 3, 2024
9 checks passed
@kevinwcyu kevinwcyu deleted the kevinwcyu/238-migrate-asset-id-on-frontend branch September 3, 2024 18:01
@ssjagad ssjagad mentioned this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssetIds migrated from AssetId (pre-v1.6.0) not displayed in panel query editor
3 participants